package org.lds.hotkey.console.business.appinstance.controller;


import org.lds.hotkey.common.model.dto.ResultDTO;
import org.lds.hotkey.console.business.appinstance.service.AppInstanceRemoteService;
import org.lds.hotkey.console.remote.model.request.AppInstanceRegisterRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 前端控制器
 *
 * @author lidongsheng
 * @since 2024-06-05
 */
@RestController
@RequestMapping("/api/remote/appinstance")
public class AppInstanceRemoteController {

    @Autowired
    private AppInstanceRemoteService appInstanceRemoteService;

    @PostMapping("/register")
    public ResultDTO<Long> registerAppInstance(@RequestBody AppInstanceRegisterRequest request) {
        return appInstanceRemoteService.registerAppInstance(request);
    }

}